//
// CPSPlaneBasisFollowSpeed.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSPlaneBasisFollowSpeed {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSPlaneBasisFollowSpeed(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSPlaneBasisFollowSpeed obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSPlaneBasisFollowSpeed(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CPSPlaneBasisFollowSpeed() {
    this(nel3dJNI.new_CPSPlaneBasisFollowSpeed(), true);
  }

  public CPlaneBasis get(CPSLocated loc, long index) {
    return new CPlaneBasis(nel3dJNI.CPSPlaneBasisFollowSpeed_get__SWIG_0(swigCPtr, this, CPSLocated.getCPtr(loc), loc, index), true);
  }

  public CPlaneBasis get(CPSEmitterInfo infos) {
    return new CPlaneBasis(nel3dJNI.CPSPlaneBasisFollowSpeed_get__SWIG_1(swigCPtr, this, CPSEmitterInfo.getCPtr(infos), infos), true);
  }

  public SWIGTYPE_p_void make(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, boolean enableNoCopy, long srcStep, boolean forceClampEntry) {
    long cPtr = nel3dJNI.CPSPlaneBasisFollowSpeed_make__SWIG_0(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, enableNoCopy, srcStep, forceClampEntry);
    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
  }

  public SWIGTYPE_p_void make(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, boolean enableNoCopy, long srcStep) {
    long cPtr = nel3dJNI.CPSPlaneBasisFollowSpeed_make__SWIG_1(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, enableNoCopy, srcStep);
    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
  }

  public SWIGTYPE_p_void make(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, boolean enableNoCopy) {
    long cPtr = nel3dJNI.CPSPlaneBasisFollowSpeed_make__SWIG_2(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, enableNoCopy);
    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
  }

  public SWIGTYPE_p_void make(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib) {
    long cPtr = nel3dJNI.CPSPlaneBasisFollowSpeed_make__SWIG_3(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib);
    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
  }

  public void make4(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, long srcStep) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_make4__SWIG_0(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, srcStep);
  }

  public void make4(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_make4__SWIG_1(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib);
  }

  public void makeN(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, long nbReplicate, long srcStep) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_makeN__SWIG_0(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, nbReplicate, srcStep);
  }

  public void makeN(CPSLocated loc, long startIndex, SWIGTYPE_p_void tab, long stride, long numAttrib, long nbReplicate) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_makeN__SWIG_1(swigCPtr, this, CPSLocated.getCPtr(loc), loc, startIndex, SWIGTYPE_p_void.getCPtr(tab), stride, numAttrib, nbReplicate);
  }

  public void serial(IStream f) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public CPSAttribMakerBase clone_c() {
    long cPtr = nel3dJNI.CPSPlaneBasisFollowSpeed_clone_c(swigCPtr, this);
    return (cPtr == 0) ? null : new CPSAttribMakerBase(cPtr, false);
  }

  public CPSPlaneBasisFollowSpeed.TProjectionPlane getProjectionPlane() {
    return CPSPlaneBasisFollowSpeed.TProjectionPlane.swigToEnum(nel3dJNI.CPSPlaneBasisFollowSpeed_getProjectionPlane(swigCPtr, this));
  }

  public void setProjectionPlane(CPSPlaneBasisFollowSpeed.TProjectionPlane pp) {
    nel3dJNI.CPSPlaneBasisFollowSpeed_setProjectionPlane(swigCPtr, this, pp.swigValue());
  }

  public final static class TProjectionPlane {
    public final static TProjectionPlane NoProjection = new TProjectionPlane("NoProjection", nel3dJNI.CPSPlaneBasisFollowSpeed_NoProjection_get());
    public final static TProjectionPlane XY = new TProjectionPlane("XY");
    public final static TProjectionPlane XZ = new TProjectionPlane("XZ");
    public final static TProjectionPlane YZ = new TProjectionPlane("YZ");
    public final static TProjectionPlane ProjectionPlaneLast = new TProjectionPlane("ProjectionPlaneLast");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TProjectionPlane swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TProjectionPlane.class + " with value " + swigValue);
    }

    private TProjectionPlane(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TProjectionPlane(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TProjectionPlane(String swigName, TProjectionPlane swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TProjectionPlane[] swigValues = { NoProjection, XY, XZ, YZ, ProjectionPlaneLast };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
